{% extends "student/student.html" %}

{% block app_content %}
<div class="container mb-4"></div>
<h1 class="display-6" align="center">已选课程</h1>
    <table class="table table-striped table-hover">
            <thead class="thead-dark">
        <tr>
            <th class="lead">课程号</th>
            <th class="lead">课程名</th>
            <th class="lead">课程学分</th>
            <th class="lead">课程学时</th>
            <th class="lead">开课学院</th>
            <th class="lead">任课教师</th>
            <th class="lead">操作</th>
        </tr>
            </thead>
            <tbody>
        {% if tables %}
        {% for table in tables %}
        <tr>
           <td class="lead">{{ table.CourseNum }}</td>
           <td class="lead">{{ table.CourseName }}</td>
           <td class="lead">{{ table.CourseCredit }}</td>
           <td class="lead">{{ table.CourseTime }}</td>
           <td class="lead">{{ table.CourseDept }}</td>
           <td class="lead">{{ table.TeacherName }}</td>
           <td class="lead">
               <a href="{{ url_for('course_change', CourseNum=table.CourseNum) }}" class="btn btn-outline-primary btn-sm" role="button">更换教师</a>
               <a href="{{ url_for('course_drop', CourseNum=table.CourseNum) }}" class="btn btn-outline-danger btn-sm" role="button">退选</a>
            </td>
        </tr>
        {% endfor %}
        {% endif %}
    </tbody>
    </table>

{% endblock %}
